package com.qfedu.aunt.commons.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qfedu.aunt.commons.dto.AdminDTO;
import com.qfedu.aunt.commons.pojo.Admin;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qfedu.aunt.commons.vo.AdminAddVo;
import com.qfedu.aunt.commons.vo.AdminQueryVo;
import com.qfedu.aunt.commons.vo.AdminUpdateVo;
import org.springframework.web.multipart.MultipartFile;

import java.lang.reflect.InvocationTargetException;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author xiaobobo
 * @since 2022-10-31
 */
public interface AdminService extends IService<Admin> {

    IPage<AdminDTO> findAdminByPage(Integer currentPage, Integer pageSize);

    /**
     * 通过id删除用户
     * @param adminId
     */
    void deleteById(String adminId);

    /**
     * 通过一连串的id删除数据
     * @param adminIds
     */
    void deleteByIds(String adminIds);

    /**
     * 通过我们组合条件查询我们的对象
     * @param adminQueryVo
     * @return
     */
    IPage<AdminDTO> findAdminByCondition(AdminQueryVo adminQueryVo,Integer currentPage,Integer pageSize) throws InvocationTargetException, IllegalAccessException;

    /**
     * 添加管理员账号
     * @param file
     * @param adminAddVo
     */
    void addAdmin(MultipartFile file, AdminAddVo adminAddVo) throws InvocationTargetException, IllegalAccessException;

    /**
     * 更新我们的数据
     * @param adminAddVo
     */
    void updateAdmin(AdminUpdateVo adminUpdateVo)throws Exception;
}
